
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="__PUBLIC__/css/common.css">
<link rel="stylesheet" href="__PUBLIC__/css/main.css">
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script type="text/javascript"
	src="__PUBLIC__/js/colResizable-1.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>

<script type="text/javascript" charset="utf-8"
	src="__PUBLIC__/ueditor1_4_3-utf8-php/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8"
	src="__PUBLIC__/ueditor1_4_3-utf8-php/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8"
	src="__PUBLIC__/ueditor1_4_3-utf8-php/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
      $(function(){  
        $(".list_table").colResizable({
          liveDrag:true,
          gripInnerHtml:"<div class='grip'></div>", 
          draggingClass:"dragging", 
          minWidth:30
        }); 
        
      }); 
   </script>
<title>新增课程分类</title>
</head>
<body>
<!--
 登陆成功{{$_SESSION['user']['username']}}
 -->
<div id="forms" class="mt10">
<div class="box">
<div class="box_border">
<div class="box_center">
<form action="{{:U('/Course/courseTypeAdd')}}" class="jqtransform"
	id="form" method="post" enctype="multipart/form-data">
<table class="form_table pt15 pb15" width="100%" border="0"
	cellpadding="0" cellspacing="0">
	<tr>
		<td class="td_right">课程分类名称:</td>
		<td class=""><input type="text" name="course_type"
			class="input-text lh30" size="40"></td>
	</tr>
	<tr>
		<td class="td_right">排序:</td>
		<td class=""><input type="text" name="order_id"
			class="input-text lh30" size="40">*请填写数字,数字小得排在前端</td>
	</tr>
	<tr>
		<td class="td_right">课程分类图片:</td>
		<td class=""><input style="width: 280px; position: static;"
			type="file" name="imgage" value="qqqq" /></td>
	</tr>
	<tr>
		<td class="td_right"></td>
		<td class="">
		<div id="test" style="color: red;"></div>
		</td>
	</tr>
	<tr>
		<td class="td_right">&nbsp;</td>
		<td class=""><input type="button" class="btn btn82 btn_save2"
			onclick="onSub1();" value="保存"> <!-- <input type="submit" name="button" class="btn btn82 btn_save2" value="保存"> -->
		<input type="reset" name="button" class="btn btn82 btn_res" value="重置">
		</td>
	</tr>
</table>

</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
	 </script>
<script type="text/javascript">
		//提交前执行
		function onSub1(){
			var course_type = $("input[name='course_type']").val();
			var img = $("input[name='imgage']").val();
			//判断课程不能为空
			if(course_type == ""){
				$("#test").html("课程分类名称不能为空!");
				return false;
			}else{
				$("#test").html("");
			}
			//判断报名须知不能为空
			if(img == "" || typeof(img) == "undefined"){
				$("#test").html("图片不能为空!");
				return false;
			}else{
				$("#test").html("");
			}
			$("#form").submit();
		}
	 </script>
</body>
